from barbican_gateway import *
import os
import signal

hft_setting = {
    "inst_type": "SPOT",
    "subscribe_codes": [
        "BTSE.SPOT.BTSE-USDT.DEPTH1",
        "BTSE.SPOT.BTSE-USDT.TRADES"
        # "BTSE.SPOT.BTSE-USDT.DEPTH20",
        # "BTSE.SPOT.BTSE-USDT.TRADES",
        # "BTSE.SPOT.BTSE-USDT.DEPTH1"
        # "UNISWAP.SPOT.BTSE-ETH.DEPTH1"

    ],
    "balance_codes": ["BTSE", "USDT"],
    "trader": "yn",
    "strategyId": "yn_spot",
    "accountId": "ynmm",
    "bbc_config_path": "/home/yinan.chen/barbican_spotmm_b/prod/BTSE/.vntrader/bbc_config.json"
}
event_engine = EventEngine()
bbc = BBCGateway(event_engine)
bbc.connect(hft_setting)


if __name__ == '__main__':
    req = CancelAllRequest(symbol="BTSE-USDT", exchange=Exchange.BTSE, product=Product.SPOT)
    bbc.cancel_all_orders(req)
    os.kill(os.getpid(), signal.SIGTERM)
